// 这里是左侧菜单路由
const menus = [
  {
    path: 'movie',
    name: 'movie',
    meta: { title: '电影管理', icon: 'play-circle-filled' },
    redirect: 'movie/movieList',
    children: [
      {
        path: 'movieList',
        name: 'movieList',
        meta: { title: '电影列表', icon: 'play-circle-filled', alive: true, name: 'index' }, // vite默认文件名就是组件的name
        component: () => import('@/views/movie/movieList.vue'),
        permission: '查看电影' // 访问页面的权限
      },
      {
        path: 'movieEdit',
        name: 'movieEdit',
        meta: { title: '电影新增', icon: 'nested' },
        component: () => import('@/views/movie/movieEdit.vue'),
        permission: '新增电影',
        hidden: true
      },
      {
        path: 'movieDetail',
        name: 'movieDetail',
        meta: { title: '电影详情', icon: 'nested' },
        component: () => import('@/views/movie/movieEdit.vue'),
        permission: '查看电影',
        hidden: true
      },
      {
        path: 'movieArea',
        name: 'movieArea',
        meta: { title: '电影地区', icon: 'point', alive: true, name: 'area' },
        component: () => import('@/views/movie/movieArea.vue'),
        permission: '查看电影'
      },
      {
        path: 'movieType',
        name: 'movieType',
        meta: { title: '电影类型', icon: 'type', alive: true, name: 'type' },
        component: () => import('@/views/movie/movieType.vue'),
        permission: '查看电影'
      }
    ]
  },
  {
    path: 'system',
    name: 'system',
    redirect: 'system/managerList',
    meta: { title: '系统管理', icon: 'setting' },
    children: [
      {
        path: 'manager',
        name: 'manager',
        meta: { title: '管理员管理', icon: 'user' },
        children: [
          {
            path: 'managerList',
            name: 'managerList',
            meta: { title: '管理员列表', icon: 'usergroup', alive: true, name: 'index' },
            component: () => import('@/views/manager/managerList.vue'),
            permission: '查看管理员'
          },
          {
            path: 'managerEdit',
            name: 'managerEdit',
            meta: { title: '管理员编辑', icon: 'user' },
            component: () => import('@/views/manager/managerEdit.vue'),
            permission: '新增管理员',
            hidden: true
          }
        ]
      },
      {
        path: 'role',
        name: 'role',
        meta: { title: '角色管理', icon: 'user' },
        children: [
          {
            path: 'roleList',
            name: 'roleList',
            meta: { title: '角色列表', icon: 'user-circle', alive: true, name: 'index' },
            component: () => import('@/views/role/roleList.vue'),
            permission: '查看角色'
          },
          {
            path: 'roleEdit',
            name: 'roleEdit',
            meta: { title: '角色编辑', icon: 'user' },
            component: () => import('@/views/role/roleEdit.vue'),
            permission: '新增角色',
            hidden: true
          }
        ]
      }
    ]
  }
]
export default menus
